<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"
    import="com.bean.*,java.util.*,com.utils.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<%
		List<Exam> list = DaoFactory.getExamDaoInstance().allexamsearch();
		String examname = null;
		for (Exam exam : list) {
			if (exam.getE_isstart()) {
				examname = exam.getE_name();
				session.setAttribute("examname", examname);
			}
		}
	%>
	<div class="container">
		<div style="text-align: center;"
			class="row panel panel-default center">
				<%
					if (examname != null) {
				%>
				<h3>
					<b><font color='red'><%=examname%></font> 正在进行中...</b>
				</h3> <%
 					} else{
 						%>
						<h3>
							<b>当前没有考试，不能登录</b>
						</h3> <%
 					}%>
 			<br/>
			<form class="form-horizontal" role="form" action="./StudentLogin">
			<div class="col-xs-offset-1 col-xs-10 input-group">
          		<span class="input-group-addon">
           			<span class="glyphicon glyphicon-user"></span>
          		</span>
          		<input type="text" class="input-lg form-control input-font-size" name="student_id" 
         		style="width:260px;" placeholder="账号" required autofocus >
        	</div><br />
		 	<div class="col-xs-offset-1 col-xs-10 input-group">
         	<span class="input-group-addon">
            	<span class="glyphicon glyphicon-lock"></span>
          	</span>
          		<input type="password" class="input-lg form-control input-font-size" name="student_pwd" 
          		style="width:260px;" placeholder="密码" required>
        	</div><br />	
        
        	<div class="col-xs-offset-1 col-xs-10 input-group">
          		<button type="submit" class="pull-left col-xs-5 btn btn-success" style="width:300px;height:50px;
          		font-size:20px;color:white;">登录</button>
        	</div>	
			</form>
		</div>
	</div>
</body>
</html>